<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ include file="../Include/Config.jsp"%>
<html>
  <head>
    <title>Web Ram Program</title>
    <meta http-equiv="Content-Type" content="text/jsp; charset=utf-8">
    <link href="ram/style.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="js/jquery-1.7.1.js" ></script>
    <script type="text/javascript">
      $(function(){
          $("#searchImg").css("cursor","pointer").click(function(){
               var proName = $("#searchContent").val();
               //var searchDiv = $("input[name=searchDiv]").val();
               if(proName == "" || proName == undefined){
                   alert("조회값을 입력해주세요.");
               }else if(proName != "" && proName != undefined){
                   $("#proName").val(proName);
                   $("form")[0].submit();                   
               }
          });
      });
    </script>
  </head>
  <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <form action="project.do" method="post">
    <html:hidden styleId="proName" name="projectForm" property="proName" />
    <html:hidden property="proId" name="projectForm"/>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr> 
        <td height="60">
          <!----- header ----------->
          <jsp:include page="../Include/Header.jsp"></jsp:include>
          <!----- header end ----------->
        </td>
      </tr>
      <tr>
        <td>            
          <div align="left">
            <table width="1251" border="0" cellpadding="0" cellspacing="0">
              <tr valign="top">
                <td width="180" height="473">
                  <%@ include file="../Include/Project_Left.jsp"%>
                </td>
                <td width="20">&nbsp;</td>
                <td>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td>
                        <!-------<table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td><img src="../images/title_member01.jpg" width="161" height="30"></td>
                            <td height="30" align="center" bgcolor="#333333">
                              <font color="#FFFFFF">
                                <strong>
                                  Project 리스트
                                </strong>
                              </font>
                            </td>
                          </tr>
                          <tr>
                            <td height="1" bgcolor="f44901"></td>
                          </tr>
                          <tr>
                            <td bgcolor="#f4f4f4">
                             <table width="100%" border="0" cellspacing="0" cellpadding="10">
                                <tr>
                                  <td valign="top">
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                      <tr>
                                        <td height="22">ㆍProject 리스트 페이지입니다.</td>
                                      </tr>
                                      <tr>
                                        <td height="22">ㆍSimulator 은 Project을 진행하기 위한 저장된 Parameter 값들을 볼수있는 곳입니다.</td>
                                      </tr>
                                    </table>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>--->
                      <img src="ram/images/project-list.jpg"></td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td height="25"> 
                        <table width="100%" cellpadding="5" cellspacing="0">
                          <tr>
                            <td width="80%">
                              <b style="color:#ff3300">전체:</b> <b> <bean:write name="totalCount" /> </b> 건 
                            </td>
                            <td width="20%" align="right">
                              <a href="project-form.do">
                                <img src="ram/images/btn_input.jpg" border="0">
                              </a>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                    <tr>
                      <td bgcolor="#dddddd">
                        <table width="100%" border="0" align="center" cellpadding="5" cellspacing="1">
                          <tr bgColor=#F4F4F4 height=30 align="center">
                            <td width="50" height="30" align=center><b>번호</b></td>
                            <td width="100" align=center><b>작성날짜</b></td>
                            <td width="448">
                              <p>
                                <b>
                                  project명
                                </b>
                              </p>
                            </td>
                            <td width="160">
                              <b>
                                Job
                              </b>
                            </td>
                            <td width="98">
                              <p>
                                <b>
                                  Modeling
                                </b>
                              </p>
                            </td>
                            <td width="98">
                              <b>
                                Simulator
                              </b>
                            </td>
							<td width="46">
							  <b>
							    Run
							  </b>
							</td>
                          </tr>
                          <logic:iterate id="list" name="projectList" indexId="count">
                          <tr align=middle bgcolor="#FFFFFF" style="COLOR: #555555" onmouseover='this.style.backgroundColor="#f5f5f5"' onmouseout='this.style.backgroundColor="#FFFFFF"' height=25>
                            <td align=center>${totalCount-count}</td>
                            <td align=center>${list.proRegdate}</td>
                            <td align=center>
                              <p>
                                <a href="project-submit.do?method=info&amp;proId=${projectForm.proId}&amp;proUid=${list.proUid}">
                                  ${list.proName}
                                </a>
                              </p>
                            </td>
                            <td align=center>${list.proJob}</td>
                            <td align=center>
                              <p>
                                <a href="project-submit.do?method=model&amp;proId=${projectForm.proId}&amp;proUid=${list.proUid}">
                                  보기
                                </a>
                              </p>
                            </td>
                            <td width="102" align="center">
                              <a href="project-submit.do?method=simulatorBase&amp;proId=${projectForm.proId}&amp;proUid=${list.proUid}">
                                보기
                              </a> 
                            </td>
							<td width="61" align="center">
							  <a href="project-submit.do?method=simulator&amp;proId=${projectForm.proId}&amp;proUid=${list.proUid}">
							    실행
							  </a>
							 </td>
                          </tr>
                          </logic:iterate>
                        </table>
                      </td>
                    </tr>
                    <tr>
                      <td height="30" align="center">
                        <b>
                          [1]
                        </b>
                      </td>
                    </tr>
                    <tr>
                      <td>
                        <select name='searchDiv'>
                          <option value="proName">프로젝트명</option>
                        </select>
                        <input type='Text' id="searchContent" size='15' name="search" class="grayform"> 
                          <img id="searchImg" src="ram/images/btn_search.jpg" align="absmiddle" border="0">
                      </td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                    </tr>
                  </table>
                  <p>&nbsp;</p>
                </td>
              </tr>
            </table>
          </div>
        </td>
      </tr>
      <tr>
        <td align="center">
          <%@ include file="../Include/Foot.jsp"%>
        </td>
      </tr>
    </table>
    </form>
  </body>
</html>